import request from '@/utils/request'
import type {ResultModel, DeptModel} from '@/api/model/model'
// 查询部门列表
export const queryDeptList = ()=> request.get<any, ResultModel>("/depts")

// 新增部门
export const addDept = (dept:DeptModel)=>request.post<DeptModel, ResultModel>("/depts", dept);
// 根据id查询部门
export const getDeptById = (id:number)=>request.get<number, ResultModel>(`/depts/${id}`);
// // 修改部门
export const updateDeptById = (dept:DeptModel)=>request.put<DeptModel, ResultModel>("/depts", dept);
// // 删除部门
export const deleteDeptById = (id:number)=>request.delete<number, ResultModel>(`/depts?id=${id}`);
